import request from '@/utils/request'

// 查询路段配置列表
export function listSegments(query) {
  return request({
    url: '/iot/segments/list',
    method: 'get',
    params: query
  })
}

// 查询路段配置详细
export function getSegments(id) {
  return request({
    url: '/iot/segments/' + id,
    method: 'get'
  })
}

// 新增路段配置
export function addSegments(data) {
  return request({
    url: '/iot/segments',
    method: 'post',
    data: data
  })
}

// 修改路段配置
export function updateSegments(data) {
  return request({
    url: '/iot/segments',
    method: 'put',
    data: data
  })
}

// 删除路段配置
export function delSegments(id) {
  return request({
    url: '/iot/segments/' + id,
    method: 'delete'
  })
}
